package com.tanguy.user.bean.orde;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by dab on 2017/12/7 0007 10:01
 * 推送的出行订单
 */
public class TripOrder implements Parcelable {
    private int orderId;

    private int state;
    private Long departtime;        //出发时间
    private String departure;       //出发地
    private String bourn;           //目的地
    private double money;           //订单金额
    private String plate;           //车牌号
    private String model;           //车辆类型
    private String brand;           //车辆品牌
    private String greadname;       //车辆级别名称
    private String dName;           //司机名称
    private String img;             //司机头像
    private String phone;           //司机电话
    private double score;           //司机评分
    private String num;             //司机接单数
    private double lat;             //司机纬度(不可查看司机位置就是0)
    private double lon;             //司机经度(不可查看司机位置就是0)
    private String evalscro	;       //评价分数 已评价的订单才有
    private String content	;       //评价内容 已评价的订单才有
    private String km	;           //司机距离用户距离 state=3或者state=4才有
    private String time	;           //司机已等待时间 state=5才有
    private String cenlmoney;        //取消订单的扣款金额 state=9或10才有
    private String cenlyy;           //取消订单的取消原因 state=9或10才有
    private String cenlms;           //取消订单的描述 state=9或10才有
    private String laststate;        //取消订单的订单状态 1=待支付 2=待接单 3=司机已接单 4=出发前往预约地点 5=到达预约地点

    public int getOrderId() {
        return orderId;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public Long getDeparttime() {
        return departtime;
    }

    public void setDeparttime(Long departtime) {
        this.departtime = departtime;
    }

    public String getDeparture() {
        return departure;
    }

    public void setDeparture(String departure) {
        this.departure = departure;
    }

    public String getBourn() {
        return bourn;
    }

    public void setBourn(String bourn) {
        this.bourn = bourn;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getPlate() {
        return plate;
    }

    public void setPlate(String plate) {
        this.plate = plate;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getCenlmoney() {
        return cenlmoney;
    }

    public void setCenlmoney(String cenlmoney) {
        this.cenlmoney = cenlmoney;
    }

    public String getCenlyy() {
        return cenlyy;
    }

    public void setCenlyy(String cenlyy) {
        this.cenlyy = cenlyy;
    }

    public String getCenlms() {
        return cenlms;
    }

    public void setCenlms(String cenlms) {
        this.cenlms = cenlms;
    }

    public String getLaststate() {
        return laststate;
    }

    public void setLaststate(String laststate) {
        this.laststate = laststate;
    }

    public String getGreadname() {
        return greadname;
    }

    public void setGreadname(String greadname) {
        this.greadname = greadname;
    }

    public String getdName() {
        return dName;
    }

    public void setdName(String dName) {
        this.dName = dName;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLon() {
        return lon;
    }

    public void setLon(double lon) {
        this.lon = lon;
    }

    public String getEvalscro() {
        return evalscro;
    }

    public void setEvalscro(String evalscro) {
        this.evalscro = evalscro;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getKm() {
        return km;
    }

    public void setKm(String km) {
        this.km = km;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public TripOrder setOrderId(int orderId) {
        this.orderId = orderId;
        return this;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.orderId);
        dest.writeInt(this.state);
        dest.writeValue(this.departtime);
        dest.writeString(this.departure);
        dest.writeString(this.bourn);
        dest.writeDouble(this.money);
        dest.writeString(this.plate);
        dest.writeString(this.model);
        dest.writeString(this.brand);
        dest.writeString(this.greadname);
        dest.writeString(this.dName);
        dest.writeString(this.img);
        dest.writeString(this.phone);
        dest.writeDouble(this.score);
        dest.writeString(this.num);
        dest.writeDouble(this.lat);
        dest.writeDouble(this.lon);
        dest.writeString(this.evalscro);
        dest.writeString(this.content);
        dest.writeString(this.km);
        dest.writeString(this.time);
        dest.writeString(this.cenlmoney);
        dest.writeString(this.cenlyy);
        dest.writeString(this.cenlms);
        dest.writeString(this.laststate);
    }

    public TripOrder() {
    }

    protected TripOrder(Parcel in) {
        this.orderId = in.readInt();
        this.state = in.readInt();
        this.departtime = (Long) in.readValue(Long.class.getClassLoader());
        this.departure = in.readString();
        this.bourn = in.readString();
        this.money = in.readDouble();
        this.plate = in.readString();
        this.model = in.readString();
        this.brand = in.readString();
        this.greadname = in.readString();
        this.dName = in.readString();
        this.img = in.readString();
        this.phone = in.readString();
        this.score = in.readDouble();
        this.num = in.readString();
        this.lat = in.readDouble();
        this.lon = in.readDouble();
        this.evalscro = in.readString();
        this.content = in.readString();
        this.km = in.readString();
        this.time = in.readString();
        this.cenlmoney = in.readString();
        this.cenlyy = in.readString();
        this.cenlms = in.readString();
        this.laststate = in.readString();
    }

    public static final Parcelable.Creator<TripOrder> CREATOR = new Parcelable.Creator<TripOrder>() {
        @Override
        public TripOrder createFromParcel(Parcel source) {
            return new TripOrder(source);
        }

        @Override
        public TripOrder[] newArray(int size) {
            return new TripOrder[size];
        }
    };
}
